\n"; for(@lines){ s/^/ /; s/\t/ /g; print HTML $_,"\n"; } print HTML "\n"; next; } } &pre_escapes; s/S<([^<>]*)>/$1/g; # embedded special $_ = &Do_refs($_,$pod); s/Z<>/
/g; # ? s/E<([^<>]*)>/\&$1\;/g; # embedded special &post_escapes; if (s/^=//) { s/\n$//s; s/\n/ /g; ($cmd, $_) = split(' ', $_, 2); if ($cmd eq 'cut') { $cutting = 1; } elsif ($cmd eq 'head1') { print HTML qq{
"; $next_para && (print HTML qq{
\n}) && ($next_para=0); } } } print HTML "\n\n"; ######################################################################### sub pre_escapes { s/\&/\&\;/g; s/<>/\>\;\>\;/g; s/([^"AIB])>/$1\>\;/g; } sub Do_refs{ local($para,$pod)=@_; foreach $char ("L","C","I","B"){ next unless /($char<[^<>]*>)/; local(@ar) = split(/($char<[^<>]*>)/,$para); local($this,$key,$num); for($this=0;$this<=$#ar;$this++){ next unless $ar[$this] =~ /${char}<([^<>]*)>/; $key=$1; if((defined($p->{"podnames"}->{$key})) && ($char eq "L")){ $ar[$this] = "\n$type$key.html\">\nthe $key manpage<\/A>\n"; # } elsif(defined($p->{"items"}->{$key})){ ($pod2,$num)=split(/_/,$p->{"items"}->{$key},2); $ar[$this] = (($pod2 eq $pod) && ($para=~/^\=item/)) ? "\n{"items"}->{$key}."\">\n$key\n" : "\n$type$pod2.html\#".$p->{"items"}->{$key}."\">$key<\/A>\n"; } elsif(defined($p->{"headers"}->{$key})){ ($pod2,$num)=split(/_/,$p->{"headers"}->{$key},2); $ar[$this] = (($pod eq $pod2) && ($para=~/^\=head/)) ? "\n{"headers"}->{$key}."\">\n$key\n" : "\n$type$pod2.html\#".$p->{"headers"}->{$key}."\">$key<\/A>\n"; } else{ (warn "No \"=item\" or \"=head\" reference for $ar[$this] in $pod\n") if $debug; if($char =~ /^[BCF]$/){ $ar[$this]="$key"; } elsif($char eq "L"){ $ar[$this]=$key; } elsif($char eq "I"){ $ar[$this]="$key"; } } } $para=join('',@ar); } $para; } sub wait{1;}